<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/TGB.Master" CodeBehind="Contactos.aspx.vb" Inherits="TGB.Contactos" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script language="javascript" type="text/javascript">
<!--

function TABLE1_onclick() {

}

// -->
</script>


    <div id="DIV1" style="width: 100%; height: 16px; text-align: left; background-color: transparent; color: #000066;" align="left" class="DivTitulo" >
    
        <asp:Label ID="LblTitulo" runat="server" CssClass="titulo" Text="Administracion de Contactos" Font-Underline="False" ForeColor="DimGray" Height="20px" Width="28%"></asp:Label></div><hr /> 
    <div id="DIV2" style="vertical-align: middle; text-align: center">
    <table class="tabla" style="width: 800px; height: 80px; text-align: center;" id="TABLE1" language="javascript" onclick="return TABLE1_onclick()" > <tr>
</tr>
        <tr>
            <td align="right" colspan="1" style="width: 11%; height: 37px">
                Tipo de Empresa</td>
            <td align="left" colspan="1" style="width: 20%; height: 37px">
                <asp:DropDownList ID="CboTEmpresa" runat="server" AutoPostBack="True" CssClass="CampoCbo"
                    Width="272px" TabIndex="1" >
                    <asp:ListItem Value="-1">Seleccione un Tipo de Empresa</asp:ListItem>
                    <asp:ListItem Value="0">Cliente</asp:ListItem>
                    <asp:ListItem Value="1">Proveedor</asp:ListItem>
                </asp:DropDownList>*</td>
            <td align="left" style="width: 4%; height: 37px">
                Empresa</td>
                        <td align="left" style="width: 24%; height: 37px">
                            <asp:DropDownList ID="CboEmpresas" runat="server" CssClass="CampoCbo" Width="256px" TabIndex="2" AppendDataBoundItems="True" AutoPostBack="True">
                                <asp:ListItem Value="-1">Seleccione Una Empresa</asp:ListItem>
                            </asp:DropDownList>*</td>
        </tr>
        <tr>
            <td align="right" bordercolor="#ff9900" colspan="4" style="vertical-align: bottom;
                height: 20px; text-align: left">
                <asp:Label ID="LblCondicion" runat="server" Font-Size="Medium" Height="16px" Style="vertical-align: middle;
                    text-align: justify" Text="Datos del Contacto" Width="160px"></asp:Label></td>
        </tr>
        <tr>
            <td align="right" style="width: 11%; height: 11px;" colspan="1" bordercolor="#ff9900">
                Nombre/s y
                Apellido/s:</td>
            <td style="width: 20%; height: 11px;" align="left" colspan="1" bordercolor="#ff9900" >
                <asp:TextBox ID="TxtApellido" runat="server" CssClass="campotxt" Width="360px" MaxLength="100" TabIndex="3"></asp:TextBox>*</td>
              </tr>
        <tr>
            <td align="right" style="width: 11%; height: 25px;" bordercolor="#ff9900">
                <asp:Label ID="Label1" runat="server" Text="Domicilio" Width="176px"></asp:Label></td>
            <td style="width: 20%; height: 25px;" align="left" bordercolor="#ff9900" >
                <asp:TextBox ID="TxtDomicilio" runat="server" CssClass="campotxt" Width="376px" Height="48px" MaxLength="200" TabIndex="5" TextMode="MultiLine"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right" style="width: 11%; height: 14px" bordercolor="#ff9900">
                <asp:Label ID="Label2" runat="server" Text="Fecha de Nacimiento" Width="176px"></asp:Label></td>
            <td align="left" style="width: 20%; height: 14px" bordercolor="#ff9900">
                <asp:TextBox ID="TxtFechaNacimiento" runat="server" CssClass="campotxt" Width="104px" TabIndex="6" MaxLength="11"></asp:TextBox>
                <asp:RangeValidator ID="RVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento"
                    ErrorMessage="Error en Fecha" MaximumValue="01/01/2050" MinimumValue="01/01/1900"
                    Type="Date"></asp:RangeValidator></td>
                
        </tr>
        

        <tr>
            <td align="right" style="width: 11%; height: 3px" bordercolor="#ff9900">
                Telefono</td>
            <td align="left" style="width: 20%; height: 3px" bordercolor="#ff9900">
                <asp:TextBox ID="TxtTelefono" runat="server" CssClass="campotxt" Width="344px" TabIndex="7" MaxLength="30"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right" bordercolor="#ff9900" style="width: 11%; height: 3px">
                Mail:</td>
            <td align="left" bordercolor="#ff9900" style="width: 20%; height: 3px">
                <asp:TextBox ID="TxtMail" runat="server" CssClass="campotxt" Width="344px" TabIndex="8" MaxLength="50"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="left" style="width: 11%; height: 12px" colspan="4" bordercolor="#ff9900">
                Campos Obligatorios *</td>
            
        </tr>
        
       
        
        <tr>   <td align="center" colspan="4" style="height: 29px"> 
                <asp:Label ID="LblError" runat="server" CssClass="LabelError" Text="ErrorLbl" Height="24px" Width="728px"></asp:Label></td>      </tr>
        <tr>
            <td align="center" colspan="4" style="height: 13px">
            <asp:LinkButton ID="LnkGuardar" runat="server" CssClass="BotonLink" TabIndex="9">Guardar</asp:LinkButton>
            <asp:LinkButton ID="LnkEliminar" runat="server" CssClass="BotonLink" TabIndex="-1">Eliminar</asp:LinkButton>
            <asp:LinkButton ID="LnkBuscar" runat="server" CssClass="BotonLink" TabIndex="13">Buscar</asp:LinkButton>
            <asp:LinkButton ID="LnkCancelar" runat="server" CssClass="BotonLink" TabIndex="14">Cancelar</asp:LinkButton>&nbsp;
            </td>
        </tr>
        
    </table>
        </div>
    <hr />
    <div style="width: 100%; height: 100%; background-color: #efefef">
        <asp:GridView ID="GridContactoCliente" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
            BorderWidth="1px" CellPadding="4" CssClass="tabla" ForeColor="Black" GridLines="Horizontal" Style="width: 100%; vertical-align: middle; text-align: center;" Width="840px" TabIndex="-2" BorderStyle="None" CellSpacing="1">
            <PagerSettings PageButtonCount="25" />
            <Columns>
                <asp:TemplateField>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CodigoContacto") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="LnkLegajo" runat="server" CommandName="Select">Modificar</asp:LinkButton>
                        <asp:HiddenField ID="HFContactoCliente" runat="server" Value='<%# bind("CodigoContacto") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Razon Social">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("CodigoEmpresa") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblEmpresa" runat="server" Text='<%# Bind("Empresa") %>'></asp:Label>
                        <asp:HiddenField ID="HFCodigoEmpresa" runat="server" Value='<%# bind("CodigoEmpresa") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="NombreApellido">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("NombreYApellido") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblNombreApellido" runat="server" Text='<%# Bind("NombreYApellido") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Domicilio">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("Domicilio") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblDomicilio" runat="server" Text='<%# Bind("Domicilio") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="FechaNacimiento">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("FechaNacimiento") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblFechaNacimiento" runat="server" Text='<%# Bind("FechaNacimiento") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Telefono">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Telefono") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblTelefono" runat="server" Text='<%# Bind("Telefono") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mail">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("eMail") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblMail" runat="server" Text='<%# Bind("eMail") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <asp:GridView ID="GridContactoProveedor" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
            BorderWidth="1px" CellPadding="4" CssClass="tabla" ForeColor="Black" GridLines="Horizontal" Style="width: 100%; vertical-align: middle; text-align: center;" Width="812px" TabIndex="-2" BorderStyle="None">
            <PagerSettings PageButtonCount="25" />
            <Columns>
                <asp:TemplateField>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CodigoContacto") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="LnkLegajo" runat="server" CommandName="Select">Modificar</asp:LinkButton>
                        <asp:HiddenField ID="HFContactoProveedor" runat="server" Value='<%# bind("CodigoContacto") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Razon Social">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("CodigoEmpresa") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblEmpresa" runat="server" Text='<%# Bind("Empresa") %>'></asp:Label>
                        <asp:HiddenField ID="HFCodigoEmpresa" runat="server" Value='<%# bind("CodigoEmpresa") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="NombreApellido">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("NombreApellido") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblNombreApellido" runat="server" Text='<%# Bind("NombreyApellido") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Domicilio">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("Domicilio") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblDomicilio" runat="server" Text='<%# Bind("Domicilio") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="FechaNacimiento">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("FechaNacimiento") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblFechaNacimiento" runat="server" Text='<%# Bind("FechaNacimiento") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Telefono">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Telefono") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblTelefono" runat="server" Text='<%# Bind("Telefono") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mail">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("eMail") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblMail" runat="server" Text='<%# Bind("eMail") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </div>
    <asp:HiddenField ID="HFIdContacto" runat="server" />
    &nbsp;
</asp:Content>
